package cn.itcast.bos.web.action;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Controller;

import cn.itcast.bos.domain.take_delivery.Promotion;
import cn.itcast.bos.web.action.common.BaseAction;

@ParentPackage("json-default")
@Namespace("/")
@Controller
@Scope("prototype")
public class PromotionAction extends BaseAction<Promotion>{
	

	/*@Autowired
	private IPromotionService promotionService;

	@Action(value="promotion_pageQuery",results={@Result(name="success",type="json")})
	public String pageQuery(){
	
		Pageable pageable=new PageRequest(page-1, rows);
	
		System.out.println(pageable);
		//System.out.println(specification);
		
		//Page<FixedArea> pages=fixedAreaService.findPage(specification,pageable);
		Page<Promotion> pages=promotionService.findPage(pageable);
	
		System.out.println(pages);
		// 压入值栈
		pushPageDataToValueStack(pages);
		return SUCCESS;
	}*/
	
}
